package wjh.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import wjh.pojo.Patient;

import java.util.List;

@Repository
public interface wyPatientMapper {

    List<Patient> like(@Param("likename")  String likename);
    @Insert("insert into patient values (null,#{name},#{password},#{avatar},#{age},#{sex},#{address},#{phone})")
    void addPatient(Patient patient);
    @Select("delete from patient where id=#{value}")
    void deletePatientByid(String ids);
    @Select("select *from patient")
    List<Patient> findAll();
@Select("select * from patient where id=#{value}")
    Patient findPatientById(int id);

    void updatePatient(Patient patient);
}
